import request from '@/utils/request'
// APP列表
export const getAppListApi = () =>
  request.get('sst-microservice-biz/sst/apk/control/app/list')

// 新增APP
export const addAppApi = (params) =>
  request.post('sst-microservice-biz/sst/apk/control/app/add', params)

// 编辑APP
export const updateAppApi = (params) =>
  request.post('sst-microservice-biz/sst/apk/control/app/update', params)

// 删除APP
export const delAppApi = (id) =>
  request.post(`sst-microservice-biz/sst/apk/control/platform/delete?id=${id}`)

// APK列表
export const getApkListApi = (params) =>
  request.get('sst-microservice-biz/sst/apk/control/apk/list', {
    params
  })

// apk上传到Oss
export const uploadApkApi = (params) =>
  request.post(`sst-microservice-biz/sst/apk/control/apk/upload`, params, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })

// APK新增
export const addApkListApi = (params) =>
  request.post('sst-microservice-biz/sst/apk/control/apk/add', params)

// APK删除
export const delApkListApi = (id) =>
  request.post(`sst-microservice-biz/sst/apk/control/apk/delete?id=${id}`)

// APK新增
export const editApkListApi = (params) =>
  request.post('sst-microservice-biz/sst/apk/control/apk/update', params)

//下载APK
export const downLoadApi = (id) =>
  request.get(`sst-microservice-biz/sst/apk/control/apk/download?apkId=${id}`)
